import {
  CURRENT_HEADER,
  currentheaderActionTypes,
} from './currentheaderActions';

export interface currentheaderState {
  currentheader: string;
}

const defaultState: currentheaderState = {
  currentheader: '/',
};

export const currentheaderReducer = (
  state = defaultState,
  action: currentheaderActionTypes
) => {
  switch (action.type) {
    case CURRENT_HEADER:
      return { ...state, currentheader: action.payload };
    default:
      return state;
  }
};
